package com.nondo.dean.product.mapper;

import com.nondo.dean.product.domain.ProductStock;
import com.nondo.dean.product.domain.ProductStockExample;
import java.util.List;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface ProductStockMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_stock
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @SelectProvider(type=ProductStockSqlProvider.class, method="countByExample")
    long countByExample(ProductStockExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_stock
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @DeleteProvider(type=ProductStockSqlProvider.class, method="deleteByExample")
    int deleteByExample(ProductStockExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_stock
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @Insert({
        "insert into product_stock (product_id, product_code, ",
        "quantity, type, ",
        "create_by, create_date, ",
        "update_by, update_date, ",
        "remarks, del_flag)",
        "values (#{productId,jdbcType=INTEGER}, #{productCode,jdbcType=INTEGER}, ",
        "#{quantity,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, ",
        "#{createBy,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP}, ",
        "#{remarks,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR})"
    })
    int insert(ProductStock record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_stock
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @InsertProvider(type=ProductStockSqlProvider.class, method="insertSelective")
    int insertSelective(ProductStock record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_stock
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @SelectProvider(type=ProductStockSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="product_id", property="productId", jdbcType=JdbcType.INTEGER),
        @Result(column="product_code", property="productCode", jdbcType=JdbcType.INTEGER),
        @Result(column="quantity", property="quantity", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<ProductStock> selectByExampleWithRowbounds(ProductStockExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_stock
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @SelectProvider(type=ProductStockSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="product_id", property="productId", jdbcType=JdbcType.INTEGER),
        @Result(column="product_code", property="productCode", jdbcType=JdbcType.INTEGER),
        @Result(column="quantity", property="quantity", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<ProductStock> selectByExample(ProductStockExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_stock
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @UpdateProvider(type=ProductStockSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") ProductStock record, @Param("example") ProductStockExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_stock
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @UpdateProvider(type=ProductStockSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") ProductStock record, @Param("example") ProductStockExample example);
}